<!doctype html>
<html>
<head>
    <meta charset=utf-8>
    <meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=Web_Path?>packs/layui/css/layui.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/font.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/style.css">
    <script src="<?=Web_Path?>packs/js/jquery.min.js"></script>
    <script src="<?=Web_Path?>packs/layui/layui.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/cscms.js"></script>
</head>
<body id="index_setting">
    <span class="layui-breadcrumb" >
        <a ><cite><i class="fa fa-map-marker"></i><?=L('tpl_01')?></cite></a>
        <a href="javascript:;"><?=L('tpl_02')?></a>
        <a href="<?=site_url('sms')?>"><?=L('tpl_03')?></a>
    </span>
    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
        <ul class="layui-tab-title">
            <li class="layui-this tablink"><?=L('tpl_03')?></li>
            <li><a class="tablink" href="javascript:cscms.tips_goto('<?=site_url('sms/add')?>');"><?=L('tpl_04')?></a></li>
            <li><a class="tablink" href="<?=site_url('sms/lists')?>"><?=L('tpl_05')?></a></li>
        </ul>
        <div class="layui-tab-content">
            <form class="layui-form layui-form-pane" action="<?=site_url('sms/save')?>" method="post">
                <fieldset class="layui-elem-field" style="margin-top: 15px;">
                    <legend><?=L('tpl_01')?></legend>
                    <div class="layui-field-box">
                        
                        <div class="layui-form-item">
                            <label class="layui-form-label"><?=L('tpl_ss_01')?></label>
                            <div class="layui-input-inline">
                                <a class="apply-link colorl" href="http://www.chshcms.com/member/sms" target="_blank">http://www.chshcms.com/member/sms</a>
                            </div>
                        </div>
                        <div class="layui-form-item" <?php if(!CS_Sms_ID || !CS_Sms_Key){echo 'style="display:none"';}?>>
                            <label class="layui-form-label"><?=L('tpl_ss_02')?></label>
                            <div class="layui-input-inline">
                                &nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" id="sms"><i class="fa fa-spin fa-spinner"></i><?=L('tpl_ss_03')?></a>
                                <a href="http://www.chshcms.com/member/sms/change.html" class="apply-link colorl" target="sms"><?=L('tpl_ss_04')?></a>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><?=L('tpl_ss_05')?></label>
                            <div class="layui-input-inline">
                                <input type="text" name="CS_Sms_ID" placeholder="<?=L('tpl_ss_05')?>" value="<?=CS_Sms_ID?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><?=L('tpl_ss_06')?></label>
                            <div class="layui-input-inline">
                                <input type="text" name="CS_Sms_Key" placeholder="<?=L('tpl_ss_07')?>" value="<?php if(CS_Sms_Key){echo substr(CS_Sms_Key,0,4).'********';}?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"><?=L('tpl_ss_08')?></label>
                            <div class="layui-input-inline">
                                <input type="text" name="CS_Sms_Name" placeholder="<?=L('tpl_ss_09')?>" value="<?=CS_Sms_Name?>" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block noborder">
                            <button style="margin-left: 20%;" class="layui-btn" lay-submit lay-filter="setting"><?=L('tpl_ss_10')?></button>
                            <button type="reset" class="layui-btn layui-btn-primary"><?=L('tpl_ss_11')?></button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
        <div class="layui-tab-content"></div>
        <div class="layui-tab-content"></div>
    </div>
<script type="text/javascript">
    cscms.init();
    function balance() {
        $('#sms').html('<?=$this->smstel->balance()?>');
    }
    $(document).ready(function(){
        setTimeout(function(){
            balance();
        },1000);
    });
</script>
</body>
</html>
